<style scoped>

</style>
<template>
    <div class="page-wrap  page-share-detail" id="page-share-detail">
        <div class="m-user">
            <header-component :page-name="pageName"></header-component>
            <div class="m-user-shareList">
                <div class="w-shareItem w-shareDetail">
                    <p class="title">{{data.title}}</p>
                    <p class="author"><a href="javascript:;" data-href="?c=profile&amp;id={{uid}}"  v-link="{name:'profile',query:{id:data.uid}}">{{data.usename}}</a><span class="time">{{data.time}}</span></p>
                    <div class="goods">
                        <p>获奖商品：<a href="javascript:;" data-href="?c=detail&amp;id={{goodsId}}" v-link="{path:'/detail',query:{id:data.goodsId}}">{{data.goodsname}}</a></p>
                        <p>商品期号：{{data.periods}}</p>
                        <p>本期参与：<span class="txt-impt">{{data.buyNum}}</span>人次</p>
                        <p>幸运号码：{{data.lucklyNum}}</p>
                        <p>揭晓时间：{{data.endTime}}</p>
                    </div>
                    <div class="all">
                        <div class="txt">{{data.content}}</div>
                        <div class="pic">
                            <template v-if="!!data.photolist">
                                <p v-for="(k,i) in data.photolist"><img :src="i"></p>
                            </template>
                            <template v-else>
                                <p><img :src="thumbs"></p>
                            </template>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
    import shareOrder from '../module/shareOrder';
    import pop from '../components/pop';
    import headerComponent from '../components/header'
    module.exports = {
        data() {
            return {

                data:{},
                id:'',
                pageName:'晒单详情'

            }
        },

        components: {

            pop,
            headerComponent

        },
        created(){

            this.$dispatch('isLoading', true);

        },
        async ready() {

            if (!!this.$route.query.id) {

                this.id=this.$route.query.id;

                let res = await shareOrder.getShareDetail(this.id);

                console.log(res);

                if (!res) {

                    history.go(-1);

                } else {

                    this.data = Object.assign({},this.data,res);

                }

            }





            this.$dispatch('isLoading', false);
        },
        beforeDestroy() {

        },
        methods: {

        }
    }
</script>
